import HttpRequest from '/@/utils/http/HttpRequest';

enum Api {
  FINDATASYNTHSECURITY_NODE_SYN_DATA = '/fdis/nodeSynData',
  FINDATASYNTHSECURITY_NODE_STORAGE = '/fdis/nodeStorage',
  FINDATASYNTHSECURITY_NODE_STATUS = '/fdis/nodeStatus',
  FINDATASYNTHSECURITY_NODE_TABLE = '/fdis/getNodeTableData',
}

export const getFDSynthNodeSynDataApi = async () => {
  const res = await HttpRequest.get<any[]>(Api.FINDATASYNTHSECURITY_NODE_SYN_DATA);
  console.log('数据合成安全-节点合成数据-接口返回数据', res);
  return res;
};
export const getFDSynthNodeStorageApi = async () => {
  const res = await HttpRequest.get<any[]>(Api.FINDATASYNTHSECURITY_NODE_STORAGE);
  console.log('数据合成安全-节点存储情况-接口返回数据', res);
  return res;
};

export const getFDSynthNodeStatusApi = async () => {
  const res = await HttpRequest.get<any[]>(Api.FINDATASYNTHSECURITY_NODE_STATUS);
  console.log('数据合成安全-节点运行情况-接口返回数据', res);
  return res;
};

export const getFDSynthNodeTableDataApi = async (params) => {
  console.log('数据合成安全-节点列表-接口请求参数', params);
  const res = await HttpRequest.get<any[]>(Api.FINDATASYNTHSECURITY_NODE_TABLE, params);
  console.log('数据合成安全-节点列表-接口返回数据', res);
  return res;
};
